package com.yql.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;

/**
 * @author  azha 
 * @create 2021-12-03 09:38 
 */

public class Menu {

	/**
	 * table name:id
	 * table type:int(11)
	 * table comment:null
	 */
	private Integer id;

	/**
	 * table name:name
	 * table type:varchar(255)
	 * table comment:null
	 */
	@JsonProperty("text")
	private String name;

	/**
	 * table name:url
	 * table type:varchar(255)
	 * table comment:null
	 */
	@JsonProperty("href")
	private String url;

	/**
	 * table name:pid
	 * table type:int(11)
	 * table comment:null
	 */
	private Integer pid;

	@JsonProperty("nodes")
	private List<Menu> menuList;

	@Override
	public String toString() {
		return "Menu{" +
				"id=" + id +
				", name='" + name + '\'' +
				", url='" + url + '\'' +
				", pid=" + pid +
				", menuList=" + menuList +
				'}';
	}

	public Menu() {
	}

	public Menu(Integer id, String name, String url, Integer pid, List<Menu> menuList) {
		this.id = id;
		this.name = name;
		this.url = url;
		this.pid = pid;
		this.menuList = menuList;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Integer getPid() {
		return pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	public List<Menu> getMenuList() {
		return menuList;
	}

	public void setMenuList(List<Menu> menuList) {
		this.menuList = menuList;
	}
}
